package com.hotel.service.Impl;

import com.hotel.entity.Swiper;
import com.hotel.mapper.SwiperMapper;
import com.hotel.service.SwiperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.dc.pr.PRError;

import java.util.List;

/**
 * @author 夏智力
 * @FileName SwiperServiceImpl
 * @date 2021/6/22 19:26
 * @Software: IntelliJ IDEA
 */
@Service
public class SwiperServiceImpl implements SwiperService {

   @Autowired
   private SwiperMapper swiperMapper;

   @Override
    public List<Swiper> selectByTypeId(int typeId) {
        return swiperMapper.selectByTypeId(typeId);
    }

    @Override
    public int addSwiper(Swiper swiper) {
        return swiperMapper.addSwiper(swiper);
    }

    @Override
    public int updateSwiper(int id, String url) {
        return swiperMapper.updateSwiper(id, url);
    }

    @Override
    public int deleteSwiper(int id) {
        return swiperMapper.deleteSwiper(id);
    }
}
